const http = require('http');
var sv = http.createServer();
sv.on('request',(res,req)=>{
    //res.statusCode = 404;
    //res.statusMessage = 'not found';
    res.setHeader('Content-Type','text/plan;charset-utf-8');

    /*
    res.writeHead(404,'not found',{
        'Content-Type':'text/plan;charset-utf-8'
    });
    */

    res.rawListeners('这是服务器端的响应报文。');
    res.end();
});

sv.listen(8088,function(){
    console.log("服务器已启动，端口号：8088")
});